(function() {
  var __hasProp = {}.hasOwnProperty,
    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };

  this.ProfileRoutes = (function(_super) {

    __extends(ProfileRoutes, _super);

    function ProfileRoutes() {
      return ProfileRoutes.__super__.constructor.apply(this, arguments);
    }

    ProfileRoutes.prototype.routes = {
      "Profile/Show/:login*path": "Show",
      "Profile/RatedBooks/:login*path": "RatedBooks"
    };

    ProfileRoutes.prototype.Show = function(login, path) {
      var layout, layoutModel, model, view;
      model = new ShowProfileModel();
      model.set("Login", login);
      layoutModel = new socialLayoutModel();
      layoutModel.set('Login', login);
      layout = new socialLayoutView({
        model: model
      });
      return view = new ShowProfileView({
        model: model
      });
    };

    ProfileRoutes.prototype.RatedBooks = function(login, path) {
      var column, direction, layout, model, view, viewType;
      layout = new LibraryLayoutView();
      model = new ProfileRatedBooksModel();
      model.set("Login", login);
      column = Url.GetParameterByName("Column");
      if (column.length) {
        model.setStaticProperty("Column", column);
      }
      direction = Url.GetParameterByName("Direction");
      if (direction.length) {
        model.setStaticProperty("Direction", parseInt(direction));
      }
      viewType = Url.GetParameterByName("viewType");
      if (viewType.length) {
        model.setStaticProperty("BookViewType", parseInt(viewType));
      }
      return view = new ProfileRatedBooksView({
        model: model
      });
    };

    return ProfileRoutes;

  })(Backbone.Router);

}).call(this);
